#include<iostream>
#include<vector>
#include<unordered_map>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<string>

using namespace std;


class Solution {
public:
    int maximumProduct(vector<int>& nums) {
        sort(nums.begin(), nums.end());
        int n = nums.size();
        return max(nums[0] * nums[1] * nums[n - 1], nums[n - 3] * nums[n - 2] * nums[n - 1]);
    }
};

int main(){

}


//2021.1.20